<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'ads-form',
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array('enctype'=>'multipart/form-data')
)); ?>

	<p class="note"></p>

	<?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'友情链接介绍'); ?>
        <?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
        <?php echo $form->error($model,'title'); ?>
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'友情链接地址'); ?>
		<?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'url'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'链接图片&nbsp;&nbsp;[程序会将图片自动缩放为;115*55大小]'); ?>
        <input type="file" id="Ads_img" name="Ads_img">
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'排序'); ?>
        <?php echo $form->textField($model,'order',array('size'=>8,'maxlength'=>255)); ?>              <span style="font-size: 12px;color: #c2c2c2;" class="msg">越小排在越前面，相同的值以先后顺序排列</span>
        <?php echo $form->error($model,'order'); ?>
    </div>

    <?php echo $form->hiddenField($model,'cid',array('value'=>0)); ?>
    <?php echo $form->hiddenField($model,'type',array('value'=>1)); ?>
    <?php echo $form->hiddenField($model,'img',array('value'=>'oz')); ?>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '新增' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->